The Ramírez Codex (also known as the Tovar Codex) is a post-conquest codex from the late 16th century entitled Relación del origen de los indios que hábitan esta Nueva España según sus Historias ("Relation of the Origin of the Indians who Inhabit this New Spain according to their Histories").
Ascribed to Juan de Tovar, most scholars believe that he based this work on an earlier Nahuatl source (now lost), that is presumed to have been compiled by one or more Christianized Aztecs sometime shortly after the conquest. This earlier document (or documents) is often referred to as "Crónica X" ("Chronicle X") and is proposed to be to be the original or influential source of a number of early manuscripts (such as the Ramírez, Durán and Acosta codices), based on similarities in their content.
The Tovar manuscript was created using traditional indigenous techniques and consists of four manuscripts that narrate the history of the Aztecs, from their peregrination into the Anahuac valley to the fall of Tenochtitlan. It also discusses some aspects of the Aztec religion.
The Ramírez Codex (Tovar manuscript) was discovered in 1856 by José Fernando Ramírez in the library of the convent of San Francisco in Mexico . There remain two extant copies of the codex. One is located in the Mexico's Museo Nacional de Antropología, while the other is in the library of John Carter Brown, in Rhode Island.
The codex was first published in 1847 as a preface to Crónica mexicayotl, a 1598 work by Fernando Alvarado Tezozomoc.